package com.ctesi.mapper;


import com.ctesi.pojo.po.hubei.AgencyPO;
import com.ctesi.pojo.po.hubei.BidPO;
import com.ctesi.pojo.po.hubei.BidderPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

//插入对象属性到数据库中
@Mapper
public interface BidMapper {

    //招标单位的插入方法
    @Insert("INSERT into hubeidata.bidder (bidId, bidUnity, bidName, bidPhone, bidAddress) values (#{bidId}, #{bidUnity}, #{bidName}, #{bidPhone}, #{bidAddress})")
    @Options()
    void insertBidder(BidderPO bidderPO);

    //代理机构的插入方法
    @Insert("INSERT into hubeidata.agency (bidId, agencyUnity, agencyName, agencyPhone, agencyAddress) values (#{bidId}, #{agencyUnity}, #{agencyName}, #{agencyPhone}, #{agencyAddress})")
    void insertAgency(AgencyPO agencyPO);

    //招标主体信息的插入方法
    @Insert("INSERT into hubeidata.maindata (bidId, bidType, bidProvince, bidTitle, bidArange, bidPubTime, memo, createTime, updateTime, bidUrl,bidArea,bidCredit,bidJudgeMethod,bidStatus,deadLine,bidPrice,bidCondition) values (#{bidId}, #{bidType}, #{bidProvince}, #{bidTitle}, #{bidArange},#{bidPubTime},#{memo},#{createTime},#{updateTime},#{bidUrl},#{bidArea},#{bidCredit},#{bidJudgeMethod},#{bidStatus},#{deadLine},#{bidPrice},#{bidCondition})")
    void insertMain(BidPO bidPO);

    //中标公告的插入方法
    @Insert("INSERT into hubeidata.zhongbiao (peopleOne, peopleTwo, peopleThree, priceOne, priceTwo, priceThree,zhongbiaoId,zhongbiaoUrl) values (#{peopleOne},#{peopleTwo},#{peopleThree},#{priceOne},#{priceTwo},#{priceThree},#{zhongbiaoId},#{zhongbiaoUrl})")
    void insertzhongbiao(BidPO bidPO);

}
